package steampunk.geom;

public class Surface {
	private Geom parent;
	
	double x1 = 0;
	double x2 = 0;
	double y1 = 0;
	double y2 = 0;
	
	/** Indicates that this surface is a floor */
	public static final int TYPE_FLOOR = 1;
	/** Indicates that this surface is a ceiling */
	public static final int TYPE_CEILING = 2;
	/** Indicates that this surface is a left wall */
	public static final int TYPE_LEFT_WALL = 4;
	/** Indicates that this surface is a right wall */
	public static final int TYPE_RIGHT_WALL = 8;
	
	int type = 0;
	
	/** The first x coordinate of this surface */
	public double x1() {
		return x1 + parent.left();
	}
	
	/** The second x coordinate of this surface */
	public double x2() {
		return x2 + parent.left();
	}
	
	/** The first y coordinate of this surface */
	public double y1() {
		return y1 + parent.left();
	}
	
	/** The second y coordinate of this surface */
	public double y2() {
		return y2 + parent.left();
	}
	
	/**
	 * Returns the type of this Surface (see Surface.TYPE_*)
	 * @return
	 */
	public int type() {
		return type;
	}
}
